/*
 * Selling Partner API for Orders
 *
 * Use the Orders Selling Partner API to programmatically retrieve order information. With this API, you can develop fast, flexible, and custom applications to manage order synchronization, perform order research, and create demand-based decision support tools.   _Note:_ For the JP, AU, and SG marketplaces, the Orders API supports orders from 2016 onward. For all other marketplaces, the Orders API supports orders for the last two years (orders older than this don't show up in the response).
 *
 * The version of the OpenAPI document: v0
 * Generated by: https://github.com/openapitools/openapi-generator.git
 */


using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using OpenAPIDateConverter = software.amzn.spapi.Client.OpenAPIDateConverter;

namespace software.amzn.spapi.Model.orders.v0
{
    /// <summary>
    /// A field collected from the regulatory form.
    /// </summary>
    [DataContract(Name = "RegulatedInformationField")]
    public partial class RegulatedInformationField : IValidatableObject
    {
        /// <summary>
        /// The type of field.
        /// </summary>
        /// <value>The type of field.</value>
        [JsonConverter(typeof(StringEnumConverter))]
        public enum FieldTypeEnum
        {
            /// <summary>
            /// Enum Text for value: Text
            /// </summary>
            [EnumMember(Value = "Text")]
            Text = 1,

            /// <summary>
            /// Enum FileAttachment for value: FileAttachment
            /// </summary>
            [EnumMember(Value = "FileAttachment")]
            FileAttachment = 2
        }


        /// <summary>
        /// The type of field.
        /// </summary>
        /// <value>The type of field.</value>
        [DataMember(Name = "FieldType", IsRequired = true, EmitDefaultValue = true)]
        public FieldTypeEnum FieldType { get; set; }
        /// <summary>
        /// Initializes a new instance of the <see cref="RegulatedInformationField" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected RegulatedInformationField() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="RegulatedInformationField" /> class.
        /// </summary>
        /// <param name="fieldId">The unique identifier of the field. (required).</param>
        /// <param name="fieldLabel">The name of the field. (required).</param>
        /// <param name="fieldType">The type of field. (required).</param>
        /// <param name="fieldValue">The content of the field as collected in regulatory form. Note that &#x60;FileAttachment&#x60; type fields contain a URL where you can download the attachment. (required).</param>
        public RegulatedInformationField(string fieldId = default(string), string fieldLabel = default(string), FieldTypeEnum fieldType = default(FieldTypeEnum), string fieldValue = default(string))
        {
            // to ensure "fieldId" is required (not null)
            if (fieldId == null)
            {
                throw new ArgumentNullException("fieldId is a required property for RegulatedInformationField and cannot be null");
            }
            this.FieldId = fieldId;
            // to ensure "fieldLabel" is required (not null)
            if (fieldLabel == null)
            {
                throw new ArgumentNullException("fieldLabel is a required property for RegulatedInformationField and cannot be null");
            }
            this.FieldLabel = fieldLabel;
            this.FieldType = fieldType;
            // to ensure "fieldValue" is required (not null)
            if (fieldValue == null)
            {
                throw new ArgumentNullException("fieldValue is a required property for RegulatedInformationField and cannot be null");
            }
            this.FieldValue = fieldValue;
        }

        /// <summary>
        /// The unique identifier of the field.
        /// </summary>
        /// <value>The unique identifier of the field.</value>
        [DataMember(Name = "FieldId", IsRequired = true, EmitDefaultValue = true)]
        public string FieldId { get; set; }

        /// <summary>
        /// The name of the field.
        /// </summary>
        /// <value>The name of the field.</value>
        [DataMember(Name = "FieldLabel", IsRequired = true, EmitDefaultValue = true)]
        public string FieldLabel { get; set; }

        /// <summary>
        /// The content of the field as collected in regulatory form. Note that &#x60;FileAttachment&#x60; type fields contain a URL where you can download the attachment.
        /// </summary>
        /// <value>The content of the field as collected in regulatory form. Note that &#x60;FileAttachment&#x60; type fields contain a URL where you can download the attachment.</value>
        [DataMember(Name = "FieldValue", IsRequired = true, EmitDefaultValue = true)]
        public string FieldValue { get; set; }

        /// <summary>
        /// Returns the string presentation of the object
        /// </summary>
        /// <returns>String presentation of the object</returns>
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("class RegulatedInformationField {\n");
            sb.Append("  FieldId: ").Append(FieldId).Append("\n");
            sb.Append("  FieldLabel: ").Append(FieldLabel).Append("\n");
            sb.Append("  FieldType: ").Append(FieldType).Append("\n");
            sb.Append("  FieldValue: ").Append(FieldValue).Append("\n");
            sb.Append("}\n");
            return sb.ToString();
        }

        /// <summary>
        /// Returns the JSON string presentation of the object
        /// </summary>
        /// <returns>JSON string presentation of the object</returns>
        public virtual string ToJson()
        {
            return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
        }

        /// <summary>
        /// To validate all properties of the instance
        /// </summary>
        /// <param name="validationContext">Validation context</param>
        /// <returns>Validation Result</returns>
        IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
        {
            yield break;
        }
    }

}
